<template>
  <div>
    <span class="form-label">{{label}}</span>
    <span>
      <input type="text" v-bind:value="value" v-on:input="updateValue($event.target.value)">
    </span>
  </div>
</template>

<script>
export default {
  props: ['value', 'label'],
  methods: {
    updateValue (value) {
      var formattedValue = value
      this.$emit('input', formattedValue)
    }
  }
}
</script>

<style>
.form-label{
  display: inline-block;
}
</style>